-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: deprecate supply royalty #267
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
_requireCanMintQuantity(id, amount + supplyRoyaltyMints); | ||
|
||
super._mint(to, id, amount, data); | ||
tokens[id].totalMinted += amount + supplyRoyaltyMints; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we still want to track totalMinted
? are we using that anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good catch - @iainnash wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i just checked our frontend repo and they're using it - i'll add that back
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep we want to track this still.
@@ -388,7 +388,8 @@ contract ZoraCreator1155Impl is | |||
_requireAdminOrRole(msg.sender, tokenIds[i], PERMISSION_BIT_MINTER); | |||
} | |||
} | |||
_mintBatch(recipient, tokenIds, quantities, data); | |||
|
|||
super._mintBatch(recipient, tokenIds, quantities, data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
@@ -553,63 +554,8 @@ contract ZoraCreator1155Impl is | |||
return super.supportsInterface(interfaceId) || interfaceId == type(IZoraCreator1155).interfaceId || ERC1155Upgradeable.supportsInterface(interfaceId); | |||
} | |||
|
|||
function _handleSupplyRoyalty(uint256 tokenId, uint256 mintAmount, bytes memory data) internal returns (uint256 totalRoyaltyMints) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're ok removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup got the approval!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good other than dan's catch for totalMinted
sooo i forgot about the |
adding back the overrides 😭 |
/// @param to to mint to | ||
/// @param id token id to mint | ||
/// @param amount of tokens to mint | ||
/// @param data as specified by 1155 standard | ||
function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual override { | ||
uint256 supplyRoyaltyMints = _handleSupplyRoyalty(id, amount, data); | ||
_requireCanMintQuantity(id, amount + supplyRoyaltyMints); | ||
_requireCanMintQuantity(id, amount); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need this check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes for limited supply nfts.
yes for limited size editions
…On Fri, Oct 13, 2023 at 17:08 Dan Oved ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In packages/1155-contracts/src/nft/ZoraCreator1155Impl.sol
<#267 (comment)>
:
> /// @param to to mint to
/// @param id token id to mint
/// @param amount of tokens to mint
/// @param data as specified by 1155 standard
function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual override {
- uint256 supplyRoyaltyMints = _handleSupplyRoyalty(id, amount, data);
- _requireCanMintQuantity(id, amount + supplyRoyaltyMints);
+ _requireCanMintQuantity(id, amount);
we need this check?
—
Reply to this email directly, view it on GitHub
<#267 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGMCOASZHBKABDSE7B65UTX7GUUXAVCNFSM6AAAAAA56HCRWGVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTMNZXGM3TKNBTGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! just please add a changeset
(with npx changeset
from the root of the project) and a minor
change then lgtm
a1716d2
to
2b887a0
Compare
before margin: 0.117 kb ~available margin: 0.839 kb~ available margin: 0.576 kb
before margin: 0.117 kb
available margin: 0.839 kbavailable margin: 0.576 kb